package com.example.qrcodecamera;

import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

public class    MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        setTitle("管理员页面"); // 设置标题

        Button btnWeight = findViewById(R.id.btn_weight_record);
        Button btnMaterial = findViewById(R.id.btn_material_info);
        Button btnuserwr = findViewById(R.id.btn_user_weight_record);
        Button btncsv = findViewById(R.id.btn_csv_record);

        btnWeight.setOnClickListener(v -> {
            startActivity(new Intent(this, WeightRecordDecodeActivity.class));
        });

        btnMaterial.setOnClickListener(v -> {
            startActivity(new Intent(this, MaterialInfoDecodeActivity.class));
        });

        btnuserwr.setOnClickListener(v -> {
            startActivity(new Intent(this, UserWeightRecordDecodeActivity.class));
        });

        btncsv.setOnClickListener(v -> {
            startActivity(new Intent(this, UploadCSVActivity.class));
        });

    }
}